<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Pepr3D: pepr3d::CommandBase&lt; Target &gt; Class Template Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(initResizable);
/* @license-end */</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="pepr3d_icon.svg"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Pepr3D
   &#160;<span id="projectnumber">v1.0</span>
   </div>
   <div id="projectbrief">Pepr3D is a 3D graphics editor designed for FDM printing</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.15 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('classpepr3d_1_1_command_base.html','');});
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="#pri-attribs">Private Attributes</a> &#124;
<a href="#friends">Friends</a> &#124;
<a href="classpepr3d_1_1_command_base-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">pepr3d::CommandBase&lt; Target &gt; Class Template Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div>  </div>
</div><!--header-->
<div class="contents">

<p><a class="el" href="classpepr3d_1_1_command_base.html" title="CommandBase is a base class for commands representing a single undoable operation....">CommandBase</a> is a base class for commands representing a single undoable operation. The command itself should be an immutable entity, containing only the necessary data to perform the action.  
 <a href="classpepr3d_1_1_command_base.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_command_8h_source.html">Command.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:aa4644cac610c68ac671fbf04af61186f"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpepr3d_1_1_command_base.html#aa4644cac610c68ac671fbf04af61186f">CommandBase</a> (bool isSlow=false, bool <a class="el" href="classpepr3d_1_1_command_base.html#aead9aa5e9149a485497805aa1a4527bf">canBeJoined</a>=false)</td></tr>
<tr class="separator:aa4644cac610c68ac671fbf04af61186f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0b01d47e5d418d3c2e0aba612c88f42b"><td class="memItemLeft" align="right" valign="top"><a id="a0b01d47e5d418d3c2e0aba612c88f42b"></a>
virtual std::string_view&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpepr3d_1_1_command_base.html#a0b01d47e5d418d3c2e0aba612c88f42b">getDescription</a> () const =0</td></tr>
<tr class="memdesc:a0b01d47e5d418d3c2e0aba612c88f42b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get description of the command. <br /></td></tr>
<tr class="separator:a0b01d47e5d418d3c2e0aba612c88f42b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a861152ab2c31b4257cf99e351da91418"><td class="memItemLeft" align="right" valign="top"><a id="a861152ab2c31b4257cf99e351da91418"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpepr3d_1_1_command_base.html#a861152ab2c31b4257cf99e351da91418">isSlowCommand</a> () const</td></tr>
<tr class="memdesc:a861152ab2c31b4257cf99e351da91418"><td class="mdescLeft">&#160;</td><td class="mdescRight">Is command slow and thus snapshot will be created before next command. <br /></td></tr>
<tr class="separator:a861152ab2c31b4257cf99e351da91418"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aead9aa5e9149a485497805aa1a4527bf"><td class="memItemLeft" align="right" valign="top"><a id="aead9aa5e9149a485497805aa1a4527bf"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpepr3d_1_1_command_base.html#aead9aa5e9149a485497805aa1a4527bf">canBeJoined</a> () const</td></tr>
<tr class="memdesc:aead9aa5e9149a485497805aa1a4527bf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Can this command be joined with other commands of the same type. <br /></td></tr>
<tr class="separator:aead9aa5e9149a485497805aa1a4527bf"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:a6943d010f181040692b0f023dbfc81e1"><td class="memItemLeft" align="right" valign="top"><a id="a6943d010f181040692b0f023dbfc81e1"></a>
virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpepr3d_1_1_command_base.html#a6943d010f181040692b0f023dbfc81e1">run</a> (Target &amp;target) const =0</td></tr>
<tr class="memdesc:a6943d010f181040692b0f023dbfc81e1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Run the command, applying the modifications to the target. <br /></td></tr>
<tr class="separator:a6943d010f181040692b0f023dbfc81e1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9ef408154b7cb446e626e049f268abb4"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpepr3d_1_1_command_base.html#a9ef408154b7cb446e626e049f268abb4">joinCommand</a> (const <a class="el" href="classpepr3d_1_1_command_base.html">CommandBase</a> &amp;)</td></tr>
<tr class="memdesc:a9ef408154b7cb446e626e049f268abb4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Join this command with other command of the same commandType, uniting both commands into this command's contents.  <a href="#a9ef408154b7cb446e626e049f268abb4">More...</a><br /></td></tr>
<tr class="separator:a9ef408154b7cb446e626e049f268abb4"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-attribs"></a>
Private Attributes</h2></td></tr>
<tr class="memitem:a884c50fcc57fef5c64963477439d911d"><td class="memItemLeft" align="right" valign="top"><a id="a884c50fcc57fef5c64963477439d911d"></a>
const bool&#160;</td><td class="memItemRight" valign="bottom"><b>mIsSlow</b></td></tr>
<tr class="separator:a884c50fcc57fef5c64963477439d911d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a16abc671f463d91822c85dfd7046ad77"><td class="memItemLeft" align="right" valign="top"><a id="a16abc671f463d91822c85dfd7046ad77"></a>
const bool&#160;</td><td class="memItemRight" valign="bottom"><b>mCanBeJoined</b></td></tr>
<tr class="separator:a16abc671f463d91822c85dfd7046ad77"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="friends"></a>
Friends</h2></td></tr>
<tr class="memitem:ae3e7ab088f3b4445fdc4a599562f325a"><td class="memTemplParams" colspan="2"><a id="ae3e7ab088f3b4445fdc4a599562f325a"></a>
template&lt;typename &gt; </td></tr>
<tr class="memitem:ae3e7ab088f3b4445fdc4a599562f325a"><td class="memTemplItemLeft" align="right" valign="top">class&#160;</td><td class="memTemplItemRight" valign="bottom"><b>CommandManager</b></td></tr>
<tr class="separator:ae3e7ab088f3b4445fdc4a599562f325a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><h3>template&lt;typename Target&gt;<br />
class pepr3d::CommandBase&lt; Target &gt;</h3>

<p><a class="el" href="classpepr3d_1_1_command_base.html" title="CommandBase is a base class for commands representing a single undoable operation....">CommandBase</a> is a base class for commands representing a single undoable operation. The command itself should be an immutable entity, containing only the necessary data to perform the action. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="aa4644cac610c68ac671fbf04af61186f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa4644cac610c68ac671fbf04af61186f">&#9670;&nbsp;</a></span>CommandBase()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Target&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classpepr3d_1_1_command_base.html">pepr3d::CommandBase</a>&lt; Target &gt;::<a class="el" href="classpepr3d_1_1_command_base.html">CommandBase</a> </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>isSlow</em> = <code>false</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>canBeJoined</em> = <code>false</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">isSlow</td><td>Mark command as slow. <a class="el" href="classpepr3d_1_1_command_manager.html" title="CommandManager handles all undoable operations on target in the form of commands See.">CommandManager</a> will create a snapshot after a slow command. attempt will be made. </td></tr>
    <tr><td class="paramname">canBeJoined</td><td>can this command be joined together with the command of the same type </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a9ef408154b7cb446e626e049f268abb4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9ef408154b7cb446e626e049f268abb4">&#9670;&nbsp;</a></span>joinCommand()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Target&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool <a class="el" href="classpepr3d_1_1_command_base.html">pepr3d::CommandBase</a>&lt; Target &gt;::joinCommand </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classpepr3d_1_1_command_base.html">CommandBase</a>&lt; Target &gt; &amp;&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">protected</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Join this command with other command of the same commandType, uniting both commands into this command's contents. </p>
<dl class="section return"><dt>Returns</dt><dd>true on successful join </dd></dl>

<p>Reimplemented in <a class="el" href="classpepr3d_1_1_cmd_paint_brush.html#a05e6c87b7cd47b72150e05f2ee584ee8">pepr3d::CmdPaintBrush</a>, <a class="el" href="classpepr3d_1_1_cmd_paint_single_color.html#a99945a65b5efae3151ebdbae619f3eed">pepr3d::CmdPaintSingleColor</a>, and <a class="el" href="classpepr3d_1_1_cmd_color_manager_change_color.html#a0c77133a022d16d1aa55ba477dade531">pepr3d::CmdColorManagerChangeColor</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>D:/Home/MFF/1-Mgr/projekt/pepr3d/src/commands/<a class="el" href="_command_8h_source.html">Command.h</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="namespacepepr3d.html">pepr3d</a></li><li class="navelem"><a class="el" href="classpepr3d_1_1_command_base.html">CommandBase</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.15 </li>
  </ul>
</div>
</body>
</html>
